package shell.view.components;

import java.awt.Graphics2D;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JPanel;
/**@author Rafael Rocha*/
public class ImageDrawable extends Drawable{
	private Image image;
	private JPanel panel;
	
	public ImageDrawable(String path, JPanel panel){
		this.image = new ImageIcon(path).getImage();
		this.panel = panel;
	}

	@Override
	public void draw(Graphics2D g2d) {
		g2d.drawImage(image, 0, 0, panel.getWidth(), panel.getHeight(), null);
	}

	@Override
	public boolean isDead() {
		return false;
	}
}
